/*jshint esversion:8*/
const { Comment } = require('../../model/comment')
module.exports = async(req, res) => {
    const { content, uid, aid } = req.body;
    await Comment.create({
        uid,
        aid,
        content,
        time: new Date()
    })
    res.redirect('/home/article?id=' + aid)
}